<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量类型</title>
</head>
<body>
    <script type="text/javascript">
        var  a = 1;
        var b = 1.1;
        var c = "abcd"
        var d = true;
        var f = [1,2,3];
        var g = NaN;
        var h = undefined;
        var i = null;
        // typeof  用于判断变量的类型
        alert(typeof a) ;
        alert(typeof b) ;
        alert(typeof c) ;
        alert(typeof d) ;
        alert(typeof f) ;
        alert(typeof g) ;
        alert(typeof h) ;
        alert(typeof i) ;

    </script>

</body>
</html>